<template>
	<view class="mybackend">
		<view class="mybackend-title">我的后台</view>
		<view class="mybackend-item">
			<view class="item">
				<image src="https://t1.chowtaiking.com.cn/img/ruoyi/2023/12/19/b8eea60fbdae489fb5ec9a26d5342428.png" mode="widthFix"></image>
				<view class="">客户订单</view>
			</view>
			<view class="item">
				<image src="https://t1.chowtaiking.com.cn/img/ruoyi/2023/12/19/0145dcda2d814b3b892e5cefa2b9647d.png" mode="widthFix"></image>
				<view class="">客户列表</view>
			</view>
			<view class="item">
				<image src="https://t1.chowtaiking.com.cn/img/ruoyi/2023/12/19/5b64dc3e892c477e8fa875465b9bf8f4.png" mode="widthFix"></image>
				<view class="">AI雷达</view>
			</view>
			<view class="item" @click="logout()">
				<image src="https://t1.chowtaiking.com.cn/img/ruoyi/2023/12/19/fc2c19e1147e497cb535dd836114312b.png" mode="widthFix"></image>
				<view class="">退出</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default{
		props:["token","phone"],
		data(){
			return{
				
			}
		},
		methods:{
			logout() {
				console.log("退出登录");
			  // 清空本地缓存中的 token
			  uni.removeStorageSync("token");
			  uni.removeStorageSync("phone");
			  // 退出登录自动刷新
			  uni.reLaunch({
			  	url:"/pages/user/user"
			  })
			}
		},
		onLoad() {
			console.log(token);
			console.log(phone,"手机号");
		}
	}
</script>

<style lang="less">
	.mybackend{
		background-color: white;
		margin-top: 10px;
		padding-bottom: 20px;
		.mybackend-title{
			padding-left: 20px;
			padding-top: 20px;
		}
		.mybackend-item{
			display: flex;
			align-items: center;
			justify-content: space-between;
			flex-wrap: wrap;
			.item{
				width: 25%;
				display: flex;
				align-items: center;
				justify-content: center;
				flex-direction: column;
				margin-top: 25px;
				font-size: 12px;
				color: gray;
				image{
					width: 25px;
					height: 25px;
				}
			}
		}
	}
</style>